
'use strict';

class _Storage extends think.service.base{

    init(...args){
        super.init(...args);
    }
}

export default class extends Map {
    /**
    * init
    * @return {}         []
    */
    constructor(){
        super()
    }

    isExist(socket, msg){
        if(!this.has(socket.id) || !this.get(socket.id).has(msg.id)){
            return false;
        }
        return true;
    }

    ifNew(id){
        if(!this.has(id)){
          this.set(id, new Map());
        }
        return this.get(id);
    }
}
